public interface Loggable {
    default void logOperation(String operation) {
        User currentUser = UserContext.getCurrentUser();
        if (currentUser != null) {
            new Log(operation, currentUser.getUsername()).saveLog();
        } else {
            System.out.println("[日志] 未登录用户操作: " + operation);
        }
    }
}